// import { useParams } from "react-router-dom"
// function Info() {

//     const p = useParams();
//     console.log(p)
//     return <div>商品详情</div>
// }

// export default Info;
import { Component } from "react";
import { useParams, useLocation, useNavigate } from "react-router-dom"
function withRouter(Component) {
    return (props) => (
        <Component
            {...props}
            params={useParams()}
            location={useLocation()}
            navigate={useNavigate()}
        />
    );
}
class Info extends Component {
    render() {
        console.log(this.props);
        return (<div>商品详情</div>)
    }
}
export default withRouter(Info)